package com.blue.po.author;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 部门表
 *
 * @author nanjie.chen
 * @email 15696471158@163.com
 * @date 2025-02-15
 */
@Data
@TableName("author_dept")
public class DeptPO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "部门ID")
    private String deptId;

    @Schema(description = "父级部门ID，一级部门为0")
    private String parentId;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "部门负责人")
    private String manager;

    @Schema(description = "联系电话")
    private String phone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "排序")
    private BigDecimal sort;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "状态(0-正常,1-禁用)")
    private String status;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者ID")
    private String creatorId;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private String createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "最近更新者ID")
    private String updaterId;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "最近更新时间")
    private String updateTime;

    @Schema(description = "子部门")
    @TableField(exist = false)
    private List<DeptPO> children;


}
